<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SEOCMS网站信息管理系统</title>
<link href="__PUBLIC__/style/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__PUBLIC__/js/js.js"></script>
<script type="text/javascript" src="__PUBLIC__/kindeditor/kindeditor.js"></script>
<script type="text/javascript" src="__PUBLIC__/kindeditor/lang/zh_CN.js"></script>
<link href="__PUBLIC__/kindeditor/themes/default/default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__PUBLIC__/js/jquery.js"></script>
<script type="text/javascript">
			KindEditor.ready(function(K) {
				 editor = K.create('#editor_id');
				var editor = K.editor({
					allowFileManager : true
				});
				K('#image').click(function() {
					editor.loadPlugin('image', function() {
						editor.plugin.imageDialog({
							imageUrl : K('#url').val(),
							clickFn : function(url, title, width, height, border, align) {
								K('#url').val(url);
								editor.hideDialog();
							}
						});
					});
				});
			});
		</script>
</head>

<body id="page">

<h2 class="tag">当前位置: 栏目管理 &gt; 编辑单页模块</h2>
<div class="box">
  <div class="page_menu"><a href="__URL__/index">栏目列表</a></div>
  <div class="infobox">
    <form name="edit" method="post" action="__URL__/pageedit" onSubmit="return checkadd()">
      <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table_b">
        <tr>
          <td align="center" class="tdbg">上级分类：</td>
          <td class="tdbg">
         	<select name="pid" >
		   {if $pid==0}
			<option value="0" selected="selected">无（作为一级栏目）</option>
		   {/if}
           {loop $cat $key $vo}
				 {if $vo['cid']==$pid}
					<option value="{$vo['cid']}" selected="selected">{$vo['cname']}</option>
				 {else}  
					 <option value="{$vo['cid']}">{$vo['cname']}</option> 
				 {/if}
            {/loop} 
		  </select>	
         </td>
        </tr>
        {loop $info $key $vo}
        <tr>
          <td width="120" align="center" class="tdbg">单页名称：<font color="#FF0000">*</font></td>
          <td class="tdbg"><input name="pagetitle" type="text" class="input" value="{$vo['name']}"><input name="id" type="hidden" value="{$vo['cid']}" /></td>
        </tr>
        <tr>
          <td width="120" align="center" class="tdbg">英文栏目名称：</td>
          <td class="tdbg"><input name="entitle" type="text" class="input" value="{$vo['enname']}"></td>
        </tr>
        </tr>
        <tr class="tdbg" id="flag2">
          <td align="center">关键词：</td>
          <td><input name="keyword" type="text" class="input" value="{$vo['keyword']}"></td>
        </tr>
        <tr class="tdbg" id="flag2">
          <td align="center">单页内容：<font color="#FF0000">*</font></td>
         <td class="td"><textarea  id="editor_id" name="content" style="width:100%;height:300px;">{$vo['content']}</textarea></td>
        </tr>
        <tr class="tdbg" id="flag2">
          <td align="center">前台显示：</td>
          <td><select name="show">
          	<option value="0">显示</option>
          	<option value="1">隐藏</option>
          </select></td>
        </tr>
        <tr class="tdbg" id="flag2">
          <td align="center">页面模版：</td>
          <td><input name="tpl" type='text' id="tpl"  class="input" value="{$vo['tpl_category']}" />
           <select id="select" onchange="document.getElementById('tpl').value=this.value;">
              <option value="选择页面模板">选择页面模板</option>
              <?php while ($file=iconv("gbk","utf-8",readdir($tpl_dir))){ ?>
              <?php if ($file != "." && $file != "..") {  ?>
              <option value="<?php echo $file; ?>"><?php echo $file; ?></option>
              <?php }} ?>
            </select></td>
        </tr>
        <tr class="tdbg" id="flag2">
          <td align="center">最后修改时间：</td>
          <td><input readonly="readonly" type="text" class="input" value="{date('Y-m-d H:i:s',$vo['edittime'])}"></td>
        </tr>
        {/loop}
        <tr class="tdbg">
          <td width="100">&nbsp;</td>
          <td>
           <input name="do" type="hidden" value="yes" />
          <input type="submit"  name="update" class="button" value="更新页面">
            <input type="button" onClick="history.go(-1)" class="button" value="放弃返回"></td>
        </tr>
      </table>
    </form>
  </div>
 </div>
</body>
</html>